//
//  ExampleSearchViewModel.m
//  NekaPrice
//
//  Created by yu on 2018/6/30.
//  Copyright © 2018年 ma c. All rights reserved.
//

#import "ExampleSearchViewModel.h"

@implementation ExampleSearchViewModel

- (void)searchExampleWithKeywords:(NSString *)keyWords withBlock:(void (^)(void))finished {
    NSPredicate *predicate = [NSPredicate predicateWithFormat:@"keywords CONTAINS[cd] %@ || title CONTAINS[cd] %@", keyWords, keyWords];
    NSLog(@">>>>>>%@", self.dataSource);
    NSArray *list = [self.dataSource filteredArrayUsingPredicate:predicate];
    NSLog(@">>>>>>%@", list);
    [self setupPageCount:list];
    finished();
}



@end
